package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.EnterpriseCarHandoverBean;
import com.molichuxing.services.infrastructure.dto.response.EnterpriseCarHandoverDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface EnterpriseCarHandoverMapper extends RootMapper<EnterpriseCarHandoverBean> {

    /**
     * 根据订单号车型车辆交接信息
     *
     * @param orderCode 订单号
     * @param type      交接类型
     * @return
     */
    List<EnterpriseCarHandoverBean> getEnterpriseCarHandoverByOrderCode(@Param("orderCode") Long orderCode,
                                                                        @Param("type") Integer type);

    /**
     * 根据退租时间查询列表
     * @param params
     */
    List<EnterpriseCarHandoverBean> getByReturnedTime(@Param("params") Map<String, Object> params);

    /**
     * 根据车辆Id、订单code、交接类型获取列表数据
     * @param carHandoverDtoList
     * @param value
     * @return
     */
    List<EnterpriseCarHandoverBean> getByDto(@Param("list")List<EnterpriseCarHandoverDto> carHandoverDtoList, @Param("type")int value);
}